package com.example.selenium.controller;

import com.example.selenium.queue.rabbitmq.SendService;
import com.example.selenium.queue.rabbitmq.config.RabbitMqConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author : 刘思盖
 * @Date : 2021/9/23 19:26
 */
@RestController
@RequestMapping("rabbitMq")
public class RabbitMqController {

    @Autowired
    private SendService sendService;

    @RequestMapping("send")
    public String send(String message){
        sendService.send(RabbitMqConstants.DIRECT_EXCHANGE_WAYBILL, RabbitMqConstants.DIRECT_ROUTING_KEY_WAYBILL_LIST,message);
        return "发送成功！";
    }
}
